import request from '@/utils/request'

// 查询会议管理列表
export function listManage(query) {
  return request({
    url: '/meetingManagement/list',
    method: 'get',
    params: query
  })
}

// 查询会议管理列表
export function manageInfo(query) {
  return request({
    url: '/meetingManagement/getInfo',
    method: 'get',
    params: query
  })
}

// 新增会议
export function addManage(data) {
  return request({
    url: '/meetingManagement/add',
    method: 'post',
    data: data
  })
}

// 修改会议
export function updateManage(data) {
  return request({
    url: '/meetingManagement/update',
    method: 'post',
    data: data
  })
}

// 变更会议状态
export function updateStatusManage(data) {
  return request({
    url: '/meetingManagement/updateStatus',
    method: 'put',
    data: data
  })
}

// 会议延迟
export function delayedStart(data) {
  return request({
    url: '/meetingManagement/delayedStart',
    method: 'put',
    data: data
  })
}

// 上传文件
export function uploadMeetingFile(data) {
  return request({
    url: '/meetingManagement/uploadMeetingFile',
    method: 'post',
    data: data
  })
}

// 查询会议后上传文件
export function getUploadMeetingFile(query) {
  return request({
    url: '/meetingManagement/getUploadMeetingFile',
    method: 'get',
    params: query
  })
}


// 删除会议
export function delManage(id) {
  return request({
    url: '/meetingManagement/delete/' + id,
    method: 'delete',
  })
}

// 会议操作记录
export function getOperateLog(query) {
  return request({
    url: '/meetingManagement/getOperateLog',
    method: 'get',
    params: query
  })
}

// 查看议题列表
export function listTopic(query) {
  return request({
    url: '/topicDiscussion/list',
    method: 'get',
    params: query
  })
}

// 添加议题
export function addTopic(data) {
  return request({
    url: '/topicDiscussion/add',
    method: 'post',
    data: data
  })
}

// 修改议题
export function updateTopic(data) {
  return request({
    url: '/topicDiscussion/update',
    method: 'put',
    data: data
  })
}

// 议题排序
export function sortTopic(data) {
  return request({
    url: '/topicDiscussion/sortList',
    method: 'post',
    data: data
  })
}

// 删除议题
export function deleteTopic(id) {
  return request({
    url: '/topicDiscussion/delete/' + id,
    method: 'delete',
  })
}

// 议题操作记录
export function getTopicLog(query) {
  return request({
    url: '/api/meeting/getTopicLog',
    method: 'get',
    params: query
  })
}